package gsd.gaudi.client.recorder;


public class ListenerMonitor {

	private static GaudiListenerRecorder instance;
	
	public static void setRecorder(GaudiListenerRecorder glr){
		ListenerMonitor.instance = glr;
	}
	
	public static void startListener(String listener)
	{
		ListenerMonitor.instance.startListener(listener);
	}

	public static void endListener(String listener)
	{
		ListenerMonitor.instance.endListener(listener);
	}

	public static void readAccess(String type, Object component, Object value)
	{
		ListenerMonitor.instance.addReadAccessToCurrentListener(type, component, value);
	}

	public static void readAccess(String type, Object component, byte value)
	{
		ListenerMonitor.readAccess(type, component, new Byte(value));
	}
	public static void readAccess(String type, Object component, short value)
	{
		ListenerMonitor.readAccess(type, component, new Short(value));
	}
	public static void readAccess(String type, Object component, int value)
	{
		ListenerMonitor.readAccess(type, component, new Integer(value));
	}
	public static void readAccess(String type, Object component, long value)
	{
		ListenerMonitor.readAccess(type, component, new Long(value));
	}
	public static void readAccess(String type, Object component, float value)
	{
		ListenerMonitor.readAccess(type, component, new Float(value));
	}
	public static void readAccess(String type, Object component, double value)
	{
		ListenerMonitor.readAccess(type, component, new Double(value));
	}
	public static void readAccess(String type, Object component, boolean value)
	{
		ListenerMonitor.readAccess(type, component, new Boolean(value));
	}
	public static void readAccess(String type, Object component, char value)
	{
		ListenerMonitor.readAccess(type, component, new String(""+value));
	}
	
	public static void writeAccess(String type, Object component, Object value)
	{
		ListenerMonitor.instance.addWriteAccessToCurrentListener(type, component, value);
	}
	public static void writeAccess(String type, Object component, byte value)
	{
		ListenerMonitor.writeAccess(type, component, new Byte(value));
	}
	public static void writeAccess(String type, Object component, short value)
	{
		ListenerMonitor.writeAccess(type, component, new Short(value));
	}
	public static void writeAccess(String type, Object component, int value)
	{
		ListenerMonitor.writeAccess(type, component, new Integer(value));
	}
	public static void writeAccess(String type, Object component, long value)
	{
		ListenerMonitor.writeAccess(type, component, new Long(value));
	}
	public static void writeAccess(String type, Object component, float value)
	{
		ListenerMonitor.writeAccess(type, component, new Float(value));
	}
	public static void writeAccess(String type, Object component, double value)
	{
		ListenerMonitor.writeAccess(type, component, new Double(value));
	}
	public static void writeAccess(String type, Object component, boolean value)
	{
		ListenerMonitor.writeAccess(type, component, new Boolean(value));
	}
	public static void writeAccess(String type, Object component, char value)
	{
		ListenerMonitor.writeAccess(type, component, new String(""+value));
	}

}
